<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="#" th:href="@{/webjars/bootstrap/4.1.3/css/bootstrap.css}" rel="stylesheet">
<script th:src="@{/webjars/bootstrap/4.1.3/js/bootstrap.min.js}"></script>
</head>
<body>
<div class="container">
    <h2>请您确认是否授权</h2>
    <p>您是否授权"[[${authorizationRequest.clientId}]]" 访问您的"[[${authorizationRequest.redirectUri}]]" 受保护资源，访问范围是[[${authorizationRequest.scope}]]。
    </p>
    <form id="confirmationForm" name="confirmationForm"
          action="../oauth/authorize" th:action="@{/oauth/authorize}" method="post">
		<input type="hidden" th:name="${'scope.'+authorizationRequest.scope}" value="true"/>
        <input name="user_oauth_approval" value="true" type="hidden"/>
        <input type="hidden" id="csrf_token" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
        <button class="btn btn-primary" type="submit">同意授权</button>
    </form>
    <br>
    <form id="denyForm" name="confirmationForm"
          action="../oauth/authorize" th:action="@{/oauth/authorize}" method="post">
        <input name="user_oauth_approval" value="false" type="hidden"/>
        <input type="hidden" id="csrf_token" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
        <button class="btn btn-primary" type="submit">拒绝授权</button>
    </form>
</div>
</body>
</html>